Skip to content

Drop the dead PrintHeader catch - #153

Merged
erwan-joly merged 1 commit into
masterfrom
chore/use-shared-console-helper
Aug 31, 2026
Merged

Drop the dead PrintHeader catch#153
erwan-joly merged 1 commit into
masterfrom
chore/use-shared-console-helper

Conversation

@erwan-joly

@erwan-joly erwan-joly commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

What

Worker.ExecuteAsync wrapped Logger.PrintHeader in catch { // ignored as header is not important }. NosCore.Shared 6.0.2 gives PrintHeader a width to fall back on when no console can answer, so nothing reaches that catch any more and it goes.

Pinned 6.0.1 → 6.0.2 for it.

Why the catch existed

Console.WindowWidth throws when no console can answer the screen-buffer question. 6.0.2 decides that with a predicate instead of catching the throw, and — the part that matters for a launcher started from a shell — it also covers the case where stdout and stderr are piped while stdin is still on the console, which 6.0.1 got wrong. Measured, all four console states now print the banner.

Testing

  • Builds with 0 warnings against the published 6.0.2; tests green — 5 tests.
  • Not played in game — this is the launcher's startup banner.

Summary by CodeRabbit

  • Bug Fixes

    • Improved startup error handling so header display failures are no longer silently ignored.
  • Chores

    • Updated the shared component package to version 6.0.2.

NosCore.Shared 6.0.2 gives PrintHeader a width to fall back on when no
console can answer, so nothing reaches the catch that was swallowing it.

Tested: builds with 0 warnings, tests green (5 tests).
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 823bc20e-e2f1-428c-918a-69f59f93c209

📥 Commits

Reviewing files that changed from the base of the PR and between bdaa57b and 60477ea.

📒 Files selected for processing (2)
  • src/NosCore.ParserInputGenerator.Launcher/Worker.cs
  • src/NosCore.ParserInputGenerator/NosCore.ParserInputGenerator.csproj

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The launcher now propagates exceptions from Logger.PrintHeader. The project updates its NosCore.Shared package reference from 6.0.1 to 6.0.2.

Changes

Header error handling

Layer / File(s) Summary
Header exception propagation
src/NosCore.ParserInputGenerator.Launcher/Worker.cs
ExecuteAsync no longer suppresses exceptions from Logger.PrintHeader.

Shared package update

Layer / File(s) Summary
Shared package reference
src/NosCore.ParserInputGenerator/NosCore.ParserInputGenerator.csproj
The NosCore.Shared reference changes from 6.0.1 to 6.0.2.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 60477

This change updates startup-banner handling and a patch dependency version without changing the launcher's download or processing workflow; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the removal of the catch around Logger.PrintHeader, which is a real and important part of the pull request. It does not mention the NosCore.Shared package update, but th…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title accurately describes the removal of the catch around Logger.PrintHeader, which is a real and important part of the pull request. It does not mention the NosCore.Shared package update, but the title need not cover every change.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/use-shared-console-helper

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@erwan-joly
erwan-joly merged commit b17f7fa into master Aug 31, 2026
3 checks passed
@erwan-joly
erwan-joly deleted the chore/use-shared-console-helper branch August 31, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant